package com.dothcya.novel9.core.common.exception;

import com.dothcya.novel9.core.common.constant.ErrorCodeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 包名称： com.dothcya.novel9.core.common.exception
 * 类名称：BussinvessException
 * 类描述：自定义业务异常
 * 创建人：@author Dothcya
 * 创建时间：2025-10-27 20:13
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessException extends RuntimeException {
    private final ErrorCodeEnum errorCodeEnum;

    public BusinessException(ErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getMessage(), null, false, false);
        this.errorCodeEnum = errorCodeEnum;
    }
}
